<?php
 include "counter2.php";
?>
<?php pagestart();
pagehead(_("Coding Standards"));
?>
<BODY bgcolor="white">
<?php pagetop(_("Coding Standards")) ?>

<?php print _("The Linux Counter isn't very formal about coding. But people need to know some things.") ?>

<h2><?php print _("Perl standards") ?></h2>
<?php print _("The update functions of the counter are written in Perl. They use the homebrew module \"FileTable.pm\" for data access - mostly through the \"Counter.pm\" module. Do NOT update data in the DB outside this module!") ?>

<h2><?php print _("PHP standards") ?></h2>
<?php print _("The counter wants to move towards having all display pages in PHP.") ?>
<p>
<?php print _("These should be based on \"phpinc/sample.php\", which will give you the right header and footer.") ?>
<p>
<?php print _("The counter uses PHP sessions.") ?>
<p>
<?php print _("The counter should work with \"register_globals\" off. Use the data accessor functions in counter.php to get at data, NOT globvars!") ?>

<h3><?php print _("Internationalization") ?></h3>
<?php print _("The counter wants to be internationalized - this is a long battle.") ?><p>
<?php print _("At the moment, the easy way to do it is to first write a page in English in the standard counter, and then run the script \"tools/internationalizewebpage\" to generate a page in the internationalized version of the site. Then one needs to generate a new .po file, and have that translated (Patrick knows this one well).") ?>
<p>
<?php print _("Sooner or later, we'll have to change to working with the internationalized files.") ?>

<h3><?php print _("State handling - EXPERIMENTAL") ?></h3>
<?php print _("State is done with two variables in the session:") ?>
<ul>
<li><?php print _("showpage - set by any script that control should return to after an action is done") ?>
<li><?php print _("message - displayed by any \"return-to\" page") ?>
</ul>
<?php print _("A Perl CGI script should do its work, set \"message\" if there's any error or other thing to tell the user, and redirect the user back to \"showpage\".") ?>
<p>
<?php print _("If an error display page is needed for complex errors (or things not coded to this standard), this error display does NOT set \"showpage\".") ?>
<p>
<?php print _("If \"showpage\" is not set, and the user is logged in, control returns to \"/person/\".") ?>
<p>
<?php print _("If \"showpage\" is not set, and the user is NOT logged in, control returns to \"/\".") ?>

<?php pagebottom("yes") ?>
</body>
</html>
